/*
 * @Author: egg1bro
 * @Date: 2023-01-03 11:26:19
 * @LastEditTime: 2023-01-07 21:15:32
 * @LastEditors: egg1bro
 * @Description: 
 * @FilePath: \team-design-backend\controller\auth.js
 * 可以输入预定的版权声明、个性签名、空行等
 */
// 授权模块
const jwt = require('jsonwebtoken')

const secret = '159951'
module.exports = {
    // 登录成功生成token
    generateToken(payload) {
        return jwt.sign(payload, secret, { expiresIn: '7d' })
    },
    secret
}